#include "weldendinstructionlogic.h"
#include "GeneralDefine.h"
#include "programengine.h"
#include "messagelog.h"

WeldEndInstructionLogic::WeldEndInstructionLogic(QString configFilePathIn, int robotIdIn, ProgramSet *programSetIn,
                     RobotIo *ioControllerIn, ProgramEngine *programEngineIn)
{
    programSet=programSetIn;
    robotId=robotIdIn;
    ioController=ioControllerIn;
    programEngine=programEngineIn;
    configFilePath=configFilePathIn;
}

E_PROGRAM_LOOP_RESULT WeldEndInstructionLogic::startWeldEnd(int programNum, WeldEndInstruction weldEndInstruct)
{
    qDebug()<<"startWeldEnd";
    programEngine->calculateNextLineToRun(programNum);

    return programEngine->isTheLastInstruction(programNum);
}
